import request from '@/utils/request'
// 查询合格证列表
export function qualifiedCardList(query) {
  return request({
    url: '/qualifiedCard/queryPageList',
    method: 'get',
    params: query
  })
}
// 获取合格证详细信息
export function qualifiedCardDetail(id) {
  return request({
    url: `/qualifiedCard/${id}`,
    method: 'get'
  })
}

// 新增合格证
export function qualifiedCardAdd(data) {
  return request({
    url: '/qualifiedCard/save',
    method: 'post',
    data: data
  })
}

// 修改合格证
export function qualifiedCardUpdate(data) {
  return request({
    url: '/qualifiedCard/update',
    method: 'post',
    data: data
  })
}

// 删除合格证
export function qualifiedCardDelete(ids) {
  return request({
    url: `/qualifiedCard/${ids}`,
    method: 'post'
  })
}

// 识别合格证
export function qualifiedCardRecog(ossId) {
    return request({
        url: `/qualifiedCard/recognition/${ossId}`,
        method: 'post',
        timeout: 60000
    })
}

// 分配车辆
export function qualifiedCardDistribute(data) {
    return request({
        url: '/qualifiedCard/distribution',
        method: 'post',
        data: data
    })
}
